<!doctype html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title>快复盘</title>
<meta http-equiv="x-ua-compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<meta name="keywords" content="快复盘" />
<meta name="description" content="快复盘" />
<meta name="author" content="通达信短线犀利版单机插件" />
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="css/fhcms.mpwhf.css" type="text/css" rel="stylesheet" />
<link href="css/fhcms.extend.css" type="text/css" rel="stylesheet" />
<script src="js/jquery.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/vue.js"></script>
<script src="js/kzz.js"></script>
<script src="js/ztls.js"></script>
<script src="js/hygn.js"></script>
<script src="js/xiniuge.my.js"></script>
<link href="css/tdx.css?tdx=22" type="text/css" rel="stylesheet" />
<link href="css/dark.css?tdx=22" type="text/css" rel="stylesheet" />
<link href="css/dataTables.bootstrap4.min.css" type="text/css" rel="stylesheet" />
<style type="text/css">
@media (max-width: 768px){
td{white-space: nowrap;}
}
.table tbody+tbody{border-top: none;}
</style>
</head>

<body><script>skin();</script>
<nav class="border-bottom px-1 overflow-hidden h_25"></nav>
<script>navStr('kfp');</script>

<div id="lianban" v-cloak>
  <table class="table table-sm table-striped mb-0">
  <thead>
    <tr class="bg-danger">
      <td class="fw_700 fz_14" colspan="2">连板股</td>
      <td class="fw_700 fz_14" colspan="6">连板数: <span id="lbs"></span></td>
    </tr>
    <tr class="text-center">
      <td class="text-left w_120">股票</td>
      <td class="w_25">板</td>
      <td class="w_30">涨停</td>
      <td class="w_30 text-center">最后</td>
      <td class="w_65 text-right">天/板</td>
      <td class="w_60i text-right">价格</td>
      <td class="w_65 text-right">流通市值</td>
      <td class="text-left">原因</td>
    </tr> 
  </thead>
  <tbody>
    <tr v-for="(sk,index) in list" :key="index" :dm="sk.symbol|dm" :id="'dm'+sk.symbol|dm">
      <td><a class="text-danger fz_14 d-inline w_120" :href="'http://www.treeid/code_'+sk.symbol | dm" title="">{{sk.stock_chi_name}}</a> <small class="d-none d-sm-inline">{{sk.symbol | dm}}</small></td>
      <td class="text-center">{{ sk.limit_up_days }}</td>
      <td class="text-center fz_11 font-num1">{{ sk.first_limit_up | riQi3}}</td>
      <td class="text-center fz_11 font-num1">{{ sk.last_limit_up | riQi3 }}</span></td>
      <td class="text-right fz_11 font-num1">{{ sk.m_days_n_boards_boards | ntnb(sk.m_days_n_boards_days) }}</td>
      <td class="text-right font-money">{{ sk.price | num2}}</td>
      <td class="text-right font-money">{{ sk.non_restricted_capital | numCN}}</td>
      <td class="fz_12"><strong class="text-info">{{ sk.surge_reason | keys }}</strong><span class="pl-1 fz_12">{{ sk.surge_reason.stock_reason}}</span></td>
    </tr>
  </tbody>
</table>
</div>

<div class="blocks" id="app2" v-cloak>
  <table class="table table-sm table-striped mb-0">
    <tbody v-for="(v, key) in blist" :key="key">
      <tr class="text-white bg-danger px-1">
        <td class="fw_700 fz_14" colspan="2">{{ key }}</td>
        <td class="fw_700 fz_14 text-white" colspan="6">{{ v | len }}只</td>
      </tr>
      <tr class="text-center">
        <td class="text-left tit w_120">名称</td>
        <td class="w_25 text-center">板</td>
        <td class="w_30 text-center">首封</td>
        <td class="w_30 text-center">最后</td>
        <td class="w_65 text-right">天/板</td>
        <td class="w_60i text-right">价格</td>
        <td class="w_65 text-right">流通</td>
        <td class="text-left">原因</td>
      </tr>
      <tr v-for="(x,k) in v" :key="k">
        <td :data-dm="x.symbol | dm"><a class="text-danger fz_14 d-inline-block w_60" class="dm"  :href="'http://www.treeid/code_'+x.symbol | dm">{{ x.stock_chi_name }}</a>
        	<small class="d-none d-sm-inline-block">{{ x.symbol | dm }}</small></td>
        <td class="text-center">{{ x.limit_up_days }}</td>
        <td class="text-center fz_11 font-num1">{{ x.first_limit_up | riQi3}}</span></td>
        <td class="text-center fz_11 font-num1">{{ x.last_limit_up | riQi3 }}</span></td>
        <td class="text-right fz_11 font-num1">{{ x.m_days_n_boards_boards | ntnb(x.m_days_n_boards_days) }}</td>
        <td class="text-right font-money">{{ x.price | num2 }}</td>
        <td class="text-right font-money">{{ x.non_restricted_capital | numCN}}</td>
        <td><strong class="text-info">{{ x.surge_reason | keys }}</strong><span class="pl-1 fz_12">{{ x.surge_reason.stock_reason}}</span></td>
      </tr>
    </tbody>
  </table>
</div>
<script>
Vue.filter('keys', function(s){
	if(typeof(s.related_plates) !=='undefined' && s.related_plates !== null){
		str='';
		for (var i = 0; i < s.related_plates.length; i++) {
			if(i>0)str+="+";
			str+=s.related_plates[i].plate_name
		}
		return str;
	}else
		return false;
});


const app1 = new Vue({
    el: '#lianban',
    data: {
        list: [],
        activeIndex: -1,
        hoverIndex: -1
    },
    created: function () {
    },
    mounted: function() {
      this.$forceUpdate();


      let refreshIntervalId;
      const refreshData = () => {
        let self = this;
        var count=0;
        jQuery.getJSON( urlz, {pool_name: 'limit_up'}, function( data ) {
        	var arr=new Array();
        	$.each(data.data, function(i,v){
        		if(v.limit_up_days>1 && v.stock_type==0){
        			arr.push(v);
        			count++;
        		}
        	});
          self.list = arr;
          self.list.sort(function(a, b) {
    				return b.limit_up_days-a.limit_up_days;
    			});
        });
        // console.log(self.list);
        $('#lbs').html(count);
      };

      const isWorkingHour = () => {
        const now = new Date();
        const dayOfWeek = now.getDay(); // 0=Sun, 1=Mon, ..., 6=Sat
        const hours = now.getHours();
        return dayOfWeek >= 1 && dayOfWeek <= 5 && hours >= 9 && hours < 15;
      };
      if (isWorkingHour()) {
        refreshData();
        refreshIntervalId = setInterval(refreshData, 6000);
      }
      else {
        refreshData();
      }

    },
    methods: {
    }

});

const app2 = new Vue({
    el: '#app2',
    data: {
        blist: []
    },
    created: function () {
    },
    mounted: function() {
      this.$forceUpdate();

      let r2;
      const rdata2 = () => {
        let self = this;
        jQuery.getJSON( urlz, {pool_name: 'limit_up'}, function( db ) {
          var plist={};
          plist['其他']=new Array();
          $.each(db.data,function(i,e){
            if(typeof(e.surge_reason.related_plates)!=='undefined'){
              $.each(e.surge_reason.related_plates,function(j,v){
                if(typeof(plist[v.plate_name])==='undefined'){
                  plist[v.plate_name]=new Array();
                }
                if(plist[v.plate_name].indexOf(e)==-1)plist[v.plate_name].push(e);
              });
            }else{
                if(plist['其他'].indexOf(e) ===-1)plist['其他'].push(e);
            }
          });
          if(typeof(plist['ST股'])!=='undefined')delete(plist['ST股']);


          $.each(plist,function(n,y){
            y.sort(function(a, b) {
              return b.limit_up_days-a.limit_up_days;
            });
          });

       //    plist.sort(function(a, b) {
    			// 	return b.length - a.length;
    			// });
          self.blist = plist;
          // console.log(self.blist);
        });
      };

      const isWorkingHour2 = () => {
        const now = new Date();
        const dayOfWeek = now.getDay(); // 0=Sun, 1=Mon, ..., 6=Sat
        const hours = now.getHours();
        return dayOfWeek >= 1 && dayOfWeek <= 5 && hours >= 9 && hours < 15;
      };
      if (isWorkingHour2()) {
        rdata2();
        r2 = setInterval(rdata2, 6000);
      }
      else {
        rdata2();
      }

    },
    methods: {
    }

});

// jQuery.getJSON( urlz, {pool_name: 'limit_up'}, function( db ) {

//   console.log(plist);
// });


</script>

<footer>
    <div class="pb-1 px_5 text-info" id="info"></div>
</footer>
<script>infoHTML();footHTML();infoBtn();</script>


<div class="d-none">
<!--<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?545130ea2c3689fdce8723d75125d67b";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
</script>-->
</div>

</body>
</html>
</div>

</body>
</html>